import 'package:flutter/material.dart';
import 'package:flutter_svprogresshud/flutter_svprogresshud.dart';

class PPHud extends Dialog {
  PPHud.install({Key? key}) : super(key: key) {
    SVProgressHUD.setDefaultStyle(SVProgressHUDStyle.dark);
    SVProgressHUD.setDefaultMaskType(SVProgressHUDMaskType.clear);
  }

  PPHud.show({Key? key, String? message}) : super(key: key) {
    SVProgressHUD.show(status: message);
    /**
     * SVProgressHUD.show(status: 'Doing Stuff');
     * SVProgressHUD.showProgress(0.91);
     * SVProgressHUD.showProgress(0.91, status: 'Loading...');
     **/
  }

  PPHud.hide({Key? key}) : super(key: key) {
    SVProgressHUD.dismiss();
  }
}
